# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an


from PyQt5.QtWidgets import *
import sys


class LIST(QListWidget):
    def __init__(self):
        super(LIST, self).__init__()
        self.addItem("Item 1")
        self.addItem("Item 2")
        self.addItem("Item 3")
        self.itemClicked.connect(self.clicked)

    def clicked(self, item):
        QMessageBox.information(self,"ListWidget","你选择了：{}".format(item.text()))


if __name__ == '__main__':
    app = QApplication(sys.argv)
    li = LIST()
    li.show()
    sys.exit(app.exec_())